PEPrintReport

Use PEPrintReport to print the specified report to either the printer or to a preview window. This function establishes a Print-Only Link where changes made during runtime by other PE calls are ignored. Use PEPrintReport any time that you simply want to print a report from an application without giving the user the ability to customize the report.

C Syntax
short CRPE_API PEPrintReport (
        const char FAR *reportFilePath,
        BOOL toDefaultPrinter,
        BOOL toWindow,
        const char FAR *title,
        int left,
        int top,
        int width,
        int height,
        DWORD style,
        HWND parentWindow );
Parameters

reportFilePath

Specifies a pointer to the NULL-terminated string that contains the name and path of the report that you want to print.

toDefaultPrinter

Specifies whether or not the report is to be sent to the default printer.

toWindow

Specifies whether or not the report is to be displayed in the preview window.

title

Specifies a pointer to the NULL-terminated string that contains the title you want to appear on the title bar if you are printing the report to a window.

left

Specifies the x coordinate of the upper left hand corner of the preview window, in pixels.

top

Specifies the y coordinate of the upper left hand corner of the preview window, in pixels.

width

Specifies the width of the preview window, in pixels.

height

Specifies the height of the preview window, in pixels.

style

Specifies the style of the window being created. Style settings can be combined using the bitwise "OR" operator. Select your style from the list that appears with PEOutputToWindow.

parentWindow

Specifies the handle of the parent window if the preview window is a child of that window.

Returns
VB Syntax

VB Sample Code for Previewing a Report

Declare Function PEPrintReport Lib "crpe32.dll" (ByVal RptName As 
String, ByVal Printer As Integer, ByVal Window As Integer, ByVal Title As 
String, ByVal Lft As Long, ByVal Top As Long, ByVal Wdth As Long, ByVal 
Height As Long, ByVal Style As Long, ByVal PWindow As Long) As Integer
Delphi Syntax
function PEPrintReport (
    reportFilePath: PChar;
    toDefaultPrinter: Bool;
    toWindow: Bool;
    title: PChar;
    left: integer;
    top: integer;
    width: integer;
    height: integer;
    style: longint;
    parentWindow: HWnd
    ): Smallint stdcall;
dBASE for Windows Syntax

EXTERN CWORD PEPrintReport (CSTRING, CLOGICAL, CLOGICAL, CSTRING, CWORD, CWORD, CWORD, CWORD, CLONG, CHANDLE) CRPE.DLL



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com